<%@page import="entities.ArticleSearch"%>
<%@page import="java.util.List"%>
<%@page import="helpers.UrlHelper"%>
<%@ page contentType="text/xml;charset=UTF-8" language="java"%>
<?xml version="1.0" encoding="UTF-8"?>
<% 
String serverUrl = UrlHelper.getServerUrl(request);
List<ArticleSearch> articles = (List<ArticleSearch>) request.getAttribute("articles");
%>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
	  <url>
	  <loc><%=serverUrl %>/</loc>
	</url>
<%
for(ArticleSearch article : articles)
{
%>
<url>
  <loc><%=serverUrl %>/article/<%=article.getAlias()%></loc>
</url>
<%
}
%>
</urlset>